3.86 \(\int \frac{(a+a \sin (e+f x)) (A+B \sin (e+f x))}{(c-c \sin (e+f x))^{3/2}} \, dx\)

Optimal. Leaf size=115 \[ -\frac{a (A+5 B) \tanh ^{-1}\left (\frac{\sqrt{c} \cos (e+f x)}{\sqrt{2} \sqrt{c-c \sin (e+f x)}}\right )}{\sqrt{2} c^{3/2} f}+\frac{a (A+B) \cos (e+f x)}{f (c-c \sin (e+f x))^{3/2}}+\frac{2 a B \cos (e+f x)}{c f \sqrt{c-c \sin (e+f x)}} \]

[Out]

-((a*(A + 5*B)*ArcTanh[(Sqrt[c]*Cos[e + f*x])/(Sqrt[2]*Sqrt[c - c*Sin[e + f*x]])])/(Sqrt[2]*c^(3/2)*f)) + (a*(
A + B)*Cos[e + f*x])/(f*(c - c*Sin[e + f*x])^(3/2)) + (2*a*B*Cos[e + f*x])/(c*f*Sqrt[c - c*Sin[e + f*x]])

________________________________________________________________________________________

Rubi [A]  time = 0.318343, antiderivative size = 115, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.139, Rules used = {2967, 2857, 2751, 2649, 206} \[ -\frac{a (A+5 B) \tanh ^{-1}\left (\frac{\sqrt{c} \cos (e+f x)}{\sqrt{2} \sqrt{c-c \sin (e+f x)}}\right )}{\sqrt{2} c^{3/2} f}+\frac{a (A+B) \cos (e+f x)}{f (c-c \sin (e+f x))^{3/2}}+\frac{2 a B \cos (e+f x)}{c f \sqrt{c-c \sin (e+f x)}} \]

Antiderivative was successfully verified.

[In]

Int[((a + a*Sin[e + f*x])*(A + B*Sin[e + f*x]))/(c - c*Sin[e + f*x])^(3/2),x]

[Out]

-((a*(A + 5*B)*ArcTanh[(Sqrt[c]*Cos[e + f*x])/(Sqrt[2]*Sqrt[c - c*Sin[e + f*x]])])/(Sqrt[2]*c^(3/2)*f)) + (a*(
A + B)*Cos[e + f*x])/(f*(c - c*Sin[e + f*x])^(3/2)) + (2*a*B*Cos[e + f*x])/(c*f*Sqrt[c - c*Sin[e + f*x]])

Rule 2967

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && I
ntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))

Rule 2857

Int[cos[(e_.) + (f_.)*(x_)]^2*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_
)]), x_Symbol] :> Simp[(2*(b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b^2*f*(2*m + 3)), x] + Dist[
1/(b^3*(2*m + 3)), Int[(a + b*Sin[e + f*x])^(m + 2)*(b*c + 2*a*d*(m + 1) - b*d*(2*m + 3)*Sin[e + f*x]), x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -3/2]

Rule 2751

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(d
*Cos[e + f*x]*(a + b*Sin[e + f*x])^m)/(f*(m + 1)), x] + Dist[(a*d*m + b*c*(m + 1))/(b*(m + 1)), Int[(a + b*Sin
[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] &&  !LtQ[m,
-2^(-1)]

Rule 2649

Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[-2/d, Subst[Int[1/(2*a - x^2), x], x, (b*C
os[c + d*x])/Sqrt[a + b*Sin[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(a+a \sin (e+f x)) (A+B \sin (e+f x))}{(c-c \sin (e+f x))^{3/2}} \, dx &=(a c) \int \frac{\cos ^2(e+f x) (A+B \sin (e+f x))}{(c-c \sin (e+f x))^{5/2}} \, dx\\ &=\frac{a (A+B) \cos (e+f x)}{f (c-c \sin (e+f x))^{3/2}}+\frac{a \int \frac{-A c-3 B c-2 B c \sin (e+f x)}{\sqrt{c-c \sin (e+f x)}} \, dx}{2 c^2}\\ &=\frac{a (A+B) \cos (e+f x)}{f (c-c \sin (e+f x))^{3/2}}+\frac{2 a B \cos (e+f x)}{c f \sqrt{c-c \sin (e+f x)}}-\frac{(a (A+5 B)) \int \frac{1}{\sqrt{c-c \sin (e+f x)}} \, dx}{2 c}\\ &=\frac{a (A+B) \cos (e+f x)}{f (c-c \sin (e+f x))^{3/2}}+\frac{2 a B \cos (e+f x)}{c f \sqrt{c-c \sin (e+f x)}}+\frac{(a (A+5 B)) \operatorname{Subst}\left (\int \frac{1}{2 c-x^2} \, dx,x,-\frac{c \cos (e+f x)}{\sqrt{c-c \sin (e+f x)}}\right )}{c f}\\ &=-\frac{a (A+5 B) \tanh ^{-1}\left (\frac{\sqrt{c} \cos (e+f x)}{\sqrt{2} \sqrt{c-c \sin (e+f x)}}\right )}{\sqrt{2} c^{3/2} f}+\frac{a (A+B) \cos (e+f x)}{f (c-c \sin (e+f x))^{3/2}}+\frac{2 a B \cos (e+f x)}{c f \sqrt{c-c \sin (e+f x)}}\\ \end{align*}

Mathematica [A]  time = 1.55308, size = 157, normalized size = 1.37 \[ \frac{a \sec (e+f x) \left (2 \sqrt{c} \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^2 (A-2 B \sin (e+f x)+3 B)+\sqrt{2} (A+5 B) \sqrt{-c (\sin (e+f x)+1)} \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )^2 \tan ^{-1}\left (\frac{\sqrt{-c (\sin (e+f x)+1)}}{\sqrt{2} \sqrt{c}}\right )\right )}{2 c^{3/2} f \sqrt{c-c \sin (e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + a*Sin[e + f*x])*(A + B*Sin[e + f*x]))/(c - c*Sin[e + f*x])^(3/2),x]

[Out]

(a*Sec[e + f*x]*(Sqrt[2]*(A + 5*B)*ArcTan[Sqrt[-(c*(1 + Sin[e + f*x]))]/(Sqrt[2]*Sqrt[c])]*(Cos[(e + f*x)/2] -
 Sin[(e + f*x)/2])^2*Sqrt[-(c*(1 + Sin[e + f*x]))] + 2*Sqrt[c]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2*(A + 3*
B - 2*B*Sin[e + f*x])))/(2*c^(3/2)*f*Sqrt[c - c*Sin[e + f*x]])

________________________________________________________________________________________

Maple [B]  time = 0.958, size = 227, normalized size = 2. \begin{align*}{\frac{a}{2\,f\cos \left ( fx+e \right ) } \left ( A\sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}}{2}\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }{\frac{1}{\sqrt{c}}}} \right ) \sin \left ( fx+e \right ) c+5\,B\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }\sqrt{2}}{\sqrt{c}}} \right ) \sin \left ( fx+e \right ) c-A\sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}}{2}\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }{\frac{1}{\sqrt{c}}}} \right ) c-4\,\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }\sqrt{c}B\sin \left ( fx+e \right ) -5\,B\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }\sqrt{2}}{\sqrt{c}}} \right ) c+2\,\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }\sqrt{c}A+6\,\sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }\sqrt{c}B \right ) \sqrt{c \left ( 1+\sin \left ( fx+e \right ) \right ) }{c}^{-{\frac{5}{2}}}{\frac{1}{\sqrt{c-c\sin \left ( fx+e \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))*(A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(3/2),x)

[Out]

1/2*a/c^(5/2)*(A*2^(1/2)*arctanh(1/2*(c*(1+sin(f*x+e)))^(1/2)*2^(1/2)/c^(1/2))*sin(f*x+e)*c+5*B*2^(1/2)*arctan
h(1/2*(c*(1+sin(f*x+e)))^(1/2)*2^(1/2)/c^(1/2))*sin(f*x+e)*c-A*2^(1/2)*arctanh(1/2*(c*(1+sin(f*x+e)))^(1/2)*2^
(1/2)/c^(1/2))*c-4*(c*(1+sin(f*x+e)))^(1/2)*c^(1/2)*B*sin(f*x+e)-5*B*2^(1/2)*arctanh(1/2*(c*(1+sin(f*x+e)))^(1
/2)*2^(1/2)/c^(1/2))*c+2*(c*(1+sin(f*x+e)))^(1/2)*c^(1/2)*A+6*(c*(1+sin(f*x+e)))^(1/2)*c^(1/2)*B)*(c*(1+sin(f*
x+e)))^(1/2)/cos(f*x+e)/(c-c*sin(f*x+e))^(1/2)/f

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \sin \left (f x + e\right ) + A\right )}{\left (a \sin \left (f x + e\right ) + a\right )}}{{\left (-c \sin \left (f x + e\right ) + c\right )}^{\frac{3}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(3/2),x, algorithm="maxima")

[Out]

integrate((B*sin(f*x + e) + A)*(a*sin(f*x + e) + a)/(-c*sin(f*x + e) + c)^(3/2), x)

________________________________________________________________________________________

Fricas [B]  time = 1.76055, size = 852, normalized size = 7.41 \begin{align*} \frac{\frac{\sqrt{2}{\left ({\left (A + 5 \, B\right )} a c \cos \left (f x + e\right )^{2} -{\left (A + 5 \, B\right )} a c \cos \left (f x + e\right ) - 2 \,{\left (A + 5 \, B\right )} a c +{\left ({\left (A + 5 \, B\right )} a c \cos \left (f x + e\right ) + 2 \,{\left (A + 5 \, B\right )} a c\right )} \sin \left (f x + e\right )\right )} \log \left (-\frac{\cos \left (f x + e\right )^{2} +{\left (\cos \left (f x + e\right ) - 2\right )} \sin \left (f x + e\right ) - \frac{2 \, \sqrt{2} \sqrt{-c \sin \left (f x + e\right ) + c}{\left (\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right )}}{\sqrt{c}} + 3 \, \cos \left (f x + e\right ) + 2}{\cos \left (f x + e\right )^{2} +{\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right )}{\sqrt{c}} - 4 \,{\left (2 \, B a \cos \left (f x + e\right )^{2} +{\left (A + 3 \, B\right )} a \cos \left (f x + e\right ) +{\left (A + B\right )} a -{\left (2 \, B a \cos \left (f x + e\right ) -{\left (A + B\right )} a\right )} \sin \left (f x + e\right )\right )} \sqrt{-c \sin \left (f x + e\right ) + c}}{4 \,{\left (c^{2} f \cos \left (f x + e\right )^{2} - c^{2} f \cos \left (f x + e\right ) - 2 \, c^{2} f +{\left (c^{2} f \cos \left (f x + e\right ) + 2 \, c^{2} f\right )} \sin \left (f x + e\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(3/2),x, algorithm="fricas")

[Out]

1/4*(sqrt(2)*((A + 5*B)*a*c*cos(f*x + e)^2 - (A + 5*B)*a*c*cos(f*x + e) - 2*(A + 5*B)*a*c + ((A + 5*B)*a*c*cos
(f*x + e) + 2*(A + 5*B)*a*c)*sin(f*x + e))*log(-(cos(f*x + e)^2 + (cos(f*x + e) - 2)*sin(f*x + e) - 2*sqrt(2)*
sqrt(-c*sin(f*x + e) + c)*(cos(f*x + e) + sin(f*x + e) + 1)/sqrt(c) + 3*cos(f*x + e) + 2)/(cos(f*x + e)^2 + (c
os(f*x + e) + 2)*sin(f*x + e) - cos(f*x + e) - 2))/sqrt(c) - 4*(2*B*a*cos(f*x + e)^2 + (A + 3*B)*a*cos(f*x + e
) + (A + B)*a - (2*B*a*cos(f*x + e) - (A + B)*a)*sin(f*x + e))*sqrt(-c*sin(f*x + e) + c))/(c^2*f*cos(f*x + e)^
2 - c^2*f*cos(f*x + e) - 2*c^2*f + (c^2*f*cos(f*x + e) + 2*c^2*f)*sin(f*x + e))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))/(c-c*sin(f*x+e))**(3/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 3.55831, size = 720, normalized size = 6.26 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(3/2),x, algorithm="giac")

[Out]

-(2*(B*a*tan(1/2*f*x + 1/2*e)/(c*sgn(tan(1/2*f*x + 1/2*e) - 1)) + B*a/(c*sgn(tan(1/2*f*x + 1/2*e) - 1)))/sqrt(
c*tan(1/2*f*x + 1/2*e)^2 + c) + sqrt(2)*(A*a + 5*B*a)*arctan(-1/2*sqrt(2)*(sqrt(c)*tan(1/2*f*x + 1/2*e) - sqrt
(c*tan(1/2*f*x + 1/2*e)^2 + c) - sqrt(c))/sqrt(-c))/(sqrt(-c)*c*sgn(tan(1/2*f*x + 1/2*e) - 1)) - 2*(3*(sqrt(c)
*tan(1/2*f*x + 1/2*e) - sqrt(c*tan(1/2*f*x + 1/2*e)^2 + c))^3*A*a + 3*(sqrt(c)*tan(1/2*f*x + 1/2*e) - sqrt(c*t
an(1/2*f*x + 1/2*e)^2 + c))^3*B*a - (sqrt(c)*tan(1/2*f*x + 1/2*e) - sqrt(c*tan(1/2*f*x + 1/2*e)^2 + c))^2*A*a*
sqrt(c) - (sqrt(c)*tan(1/2*f*x + 1/2*e) - sqrt(c*tan(1/2*f*x + 1/2*e)^2 + c))^2*B*a*sqrt(c) - (sqrt(c)*tan(1/2
*f*x + 1/2*e) - sqrt(c*tan(1/2*f*x + 1/2*e)^2 + c))*A*a*c - (sqrt(c)*tan(1/2*f*x + 1/2*e) - sqrt(c*tan(1/2*f*x
 + 1/2*e)^2 + c))*B*a*c - A*a*c^(3/2) - B*a*c^(3/2))/(((sqrt(c)*tan(1/2*f*x + 1/2*e) - sqrt(c*tan(1/2*f*x + 1/
2*e)^2 + c))^2 - 2*(sqrt(c)*tan(1/2*f*x + 1/2*e) - sqrt(c*tan(1/2*f*x + 1/2*e)^2 + c))*sqrt(c) - c)^2*c*sgn(ta
n(1/2*f*x + 1/2*e) - 1)))/f